package com.bw.user_module.login

import com.bw.user_module.login.entity.LoginEntity
import com.kf.common.entity.BaseEntity
import com.kf.common.mvi.model.BaseModel
import com.kf.lib_network.retrofit.HttpType
import com.kf.lib_network.retrofit.RetrofitFactory
import kotlinx.coroutines.flow.Flow

class LoginModel : BaseModel() {

    fun requestLogin(map: Map<String, Any>) :Flow<BaseEntity<LoginEntity>>{
        return RetrofitFactory()
            .createRetrofit(HttpType.SIGN)
            .create(ApiService::class.java)
            .requestLogin(createBody(map));
    }

}